package leecode

import "unicode"

func numberOfSpecialChars(word string) int {
	hashMap := make(map[rune]bool)
	for _, str := range word {
		hashMap[str] = true
	}
	var result int
	for i := 'Z'; i >= 'A'; i-- {
		if hashMap[i] && hashMap[unicode.ToLower(i)] {
			result++
		}
	}
	return result
}
